package da.asclass.component
{
    import flash.events.Event;

    import mx.containers.Panel;
    import mx.containers.VDividedBox;
    import mx.controls.Button;
    import mx.controls.TextArea;

    public class ChatPanel extends Panel
    {
        private var vdbChat:VDividedBox;
        private var txtDisplayInfo:TextArea;
        private var txtSendInfo:TextArea;

        public function ChatPanel()
        {
            super();
            this.layout = "absolute";
            this.height = 350;
            this.width = 280;
            this.horizontalScrollPolicy = "false";
            this.verticalScrollPolicy = "false";
        }

        protected override function createChildren():void
        {
            super.createChildren();
            this.vdbChat = new VDividedBox();
            this.txtDisplayInfo = new TextArea();
            this.txtSendInfo = new TextArea();

            this.titleTextField.text = "Chat Panel";
            this.vdbChat.width = 260;
            this.vdbChat.height = 310;

            this.txtDisplayInfo.width = 260;
            this.txtDisplayInfo.height = 180;
            this.txtDisplayInfo.editable = false;

            this.txtSendInfo.width = 260;
            this.txtSendInfo.height = 120;
            this.txtSendInfo.editable = true;

            this.vdbChat.addChild(this.txtDisplayInfo);
            this.vdbChat.addChild(this.txtSendInfo);
            this.addChild(this.vdbChat);
        }

        private function doMaximize(event:Event):void
        {
            setState(1);
        }

        private function doRestore(event:Event):void
        {
        }

        protected override function updateDisplayList(unscaledWidth:Number , unscaledHeight:Number):void
        {
            super.updateDisplayList(unscaledWidth , unscaledHeight);
        }

        public function setState(state:int):void
        {
        }

    }
}